<%--
    Document   : alum_AulaVirtualEnlaces
    Created on : 05/01/2012, 10:35:45 AM
    Author     : Cabrera Abanto, Alan
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ page errorPage="../../error.jsp?from=alum_AulaVirtualEnlaces.jsp" %>
<%@ page import="agb.Modelo.UsuarioWeb" %>
<%@ page import="java.util.Vector" %>

<%@page session="true" %>
<%--@taglib uri="/struts-tags" prefix="s"--%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>

        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

            <link href="/SistemaWebAGB_2.0/dinamica/css/admin_1.css" rel="stylesheet" type="text/css" />
            <link href="/SistemaWebAGB_2.0/dinamica/css/alumno.css" rel="stylesheet" type="text/css" />
			<link href="/SistemaWebAGB_2.0/dinamica/css/style.css" rel="stylesheet" type="text/css" />
       
        <title></title>
        <%
            UsuarioWeb oUsuario = new UsuarioWeb();
            oUsuario = (UsuarioWeb) session.getAttribute("anuncioWeb");
            
        %>
 <script language="JavaScript">
            function validarDatos() {                
                pass = document.frmBuscar.txtAnuncio;         
                repite = document.frmBuscar.txtFecha;
                tipo = document.frmBuscar.cboEstado;
                if (pass.value == "") {
                    alert('Debe ingresar un Anuncio');
                    pass.focus();
                    return false;
                }else{
                    if(repite.value == ""){                        
                        alert('Debe ingresar una Fecha');
                        repite.focus();
                        return false;
                    }else{
                        if (tipo.selectedIndex == 0) {
                            alert("Debe seleccionar un estado de la lista despegable.");
                            tipo.focus();
                            return false;
                        } else {
                            return true;
                        }                                            
                    }
                }
            }                
            
 function imprimir() {
                window.parent.frames[5].focus();
                window.print();
            }

    


        </script>
    </head>
    <body>
        <table width="100%" border="0" cellpadding="0" cellspacing="0">

            <tr>
                <td height="143"></td>
                <td colspan="4" valign="top">
                       <form name="frmBuscar"
                    action="/SistemaWebAGB_2.0/SrvServletAdministrador?accion=modificaAnuncio"
                


            method="post" target="principal" onsubmit="return validarDatos()">

                    <table align="CENTER" width="75%" border="0" cellpadding="0" cellspacing="0" id="tabla">
                        <!--DWLayoutTable-->
                        <input type="hidden" name="codAnuncio" value="<%=oUsuario.getCodAnuncio()%>">                         
                        <tr class="cabecera">
                          <td height="20" colspan="2" align="center"  valign="middle" class="titulo">Modificar Anuncio Web </td>
                        </tr>
                        <tr>
                            <td height="20" width="20%" align="left"  valign="middle" class="titulo">Anuncio: &nbsp;</td>
                            <td valign="middle" class="txtBase" align="left">
                                <input type="text" name="txtAnuncio" value="<%=oUsuario.getAnuncioWeb() %>" style="width:250px">
&nbsp;                                </td>
                        </tr>
                        <tr>
                            <td height="20" width="20%" align="left"  valign="middle" class="titulo">Fecha: &nbsp; </td>
                            <td valign="middle" class="txtBase" align="left">
                                <input type="text" name="txtFecha" value="<%=oUsuario.getFechaAnuncioWeb() %>" style="width:250px">
&nbsp;                                </td>
                        </tr>
                        <tr>
                            <td height="20" width="20%" align="left"  valign="middle" class="titulo">Web: &nbsp; </td>
                            <td valign="middle" class="txtBase" align="left">
                                <input type="text" name="txtWeb" value="<%=oUsuario.getWebAnuncio() %>" style="width:250px">
&nbsp;                                </td>
                        </tr>

                        
                        <tr valign="middle">
                            <td height="20" width="20%" align="left"  valign="middle" class="titulo">Estado: &nbsp; </td>
                            <td valign="middle"  class="txtBase" align="left">                                
                         <label>                                   
                        <select name="cboEstado">
                            <option value="0" >--Seleccione un Estado--</option>
                            <%
                            if(oUsuario.getEstadoAnuncio().equals("A")){
                            %>
                            <option value="A" selected>ACTIVO</option>
                            <option value="I" >INACTIVO</option>
                            <%
                            }else{%>
                            <option value="A" >ACTIVO</option>
                            <option value="I" selected>INACTIVO</option>                            
                            <%}
                            %>
                        </select>                       
                        </label>                                </td>
                        </tr>
                        
                      
                        
                       
                          <tr valign="middle">
                            <td height="45" width="20%" align="left"  valign="middle" >&nbsp;  </td>
                            <td valign="middle"  class="txtBase" align="left">                           
                &nbsp;<input type="submit" value="Modificar" />   </td>
                        </tr>
                        </table>
                    </form>
                </td>
            </tr>
            <tr >
                <td height="2">&nbsp;</td>
                <td align="left"><a href="javascript:window.history.back()"> ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retornar</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
            </tr>
        </table>
        </body>

</html>